
#include"HttpServer.hpp"
#define PARAMETER_ERROR 1
#include<memory>
void Usage(std::string proc)
{
    std::cout<<"Usage:\n\r"<<proc<<" port"<<std::endl;
}
int main(int argc,char*argv[])
{
    if(argc!=2)
    {
        Usage(argv[0]);
        exit(PARAMETER_ERROR);
    }
    uint16_t port=std::stoi(argv[1]);
   std::shared_ptr<HttpServer>svr(new HttpServer(port));
   svr->Init();
   svr->Loop();
    return 0;
}